﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mysoft.MyCM.Business.Scm
{
	public abstract class BaseBLL
	{
		/// <summary>
		/// 检查返回结果
		/// </summary>
		/// <param name="result"></param>
		protected void CheckResult(Mysoft.MyCM.Scm.ApiResult result)
		{
			if (result == null)
				throw new M.MException("未能获取到有效的结果！", M.MExceptionLevel.Stop);
			if (!result.Success)
				throw new M.MException(result.Error, M.MExceptionLevel.Stop);
		}
	}
}
